{extend name='base'}
{block name='ex'}
<!--视频播放-->
<script type="text/javascript" charset="utf-8" src="/scripts/ckplayer/ckplayer.js"></script>
<!--视频播放-->
<script type="text/javascript">
$(function(){
	var video_src = '';
        if (video_src == null || video_src == undefined || video_src == '') {
            $("#video-box").hide();
        } else {
            //设置视频容器大小
            winResize();
            $(window).resize(function () {
                winResize();
            });
            //初始化视频容器
            initCKPlayer('video-box', '', '/scripts/ckplayer/ckplayer.swf');
        }
});
//初始化视频播放器需配合ckplayer.js使用
function initCKPlayer(boxId, videoSrc,playerSrc){
	var flashvars={
        f:videoSrc,
        c:0,
        loaded:'loadedHandler'
    };
    var video=[videoSrc];
    CKobject.embed(playerSrc,boxId,'video_v1','100%','100%',false,flashvars,video);
}

//改变大小函数
function winResize(){
	if($(".section").width() == 1180){
		$(".video-box").width(840);
		$(".video-box").height(473);
	}else{
		$(".video-box").width(601);
		$(".video-box").height(338);
	}
}
$(document).ready(function(){
  
  $('li.dropdown').mousemove(function(){
  $(this).find('ul').slideDown("1000");//you can give it a speed
  });
  $('li.dropdown').mouseleave(function(){
  $(this).find('ul').slideUp("fast");
  });

//导航栏
   var Tabs = $('div #newsListnewsTitleID').children('div');
   var category_id = $('#category_id').val();
    var len = Tabs.length;
      for (i = 0; i < len; i++) {
          if(Tabs [i].id==category_id)
          {
        	Tabs [i].style.borderBottom = "2px  solid #004EA1";        
           }
       }
  
});
</script>
<style>
    .titlet{
        font-size: 24px;
        padding-bottom:30px;
    }
    .comment{
        width:100%; 
        height:200px;
        border:1px solid grey;
        border-radius:4px;
    }
    .submitt{
        margin-top:10px;
        float:right;
        width:100px;
        height:40px;
        border:1px solid grey;
        border-radius:4px;
    }
    .submitif{
        display:block;
        margin-top:10px;
        float:right;
        border:1px solid grey;
        border-radius:4px;
        padding: 5px;
    }
    .list li{       
        margin-top:20px;
    }
    .commenter{
        float:left;
        font-size:20px;
    }
    .date{
        float:right;
        color:#777;
        line-height:50px;
        height:40px;
    }
    .comment_con{
        width:100%;
        min-height:100px;
        /*background:#ddd;*/
        border:1px solid #ddd;
        border-radius:5px;
        padding:5px 0;
        transition:all .5s;
    }
    .comment_con:hover{
        background:#eee;
    }
    .comment_con p{
      margin:0 10px;
    }
    .pagination{
        /*text-align:center;*/
        /*margin:auto;*/
    }
</style>
{/block}
{block name='con'}
    {include file='news/header'}
    <div class="width1020" style="margin-top: 30px;">
        <div class="newshowL">
            <div class="newshowTitle"> 
                {$arr2.title}
            </div>
            <div class="newshowTime">
                <div class="fl newshowDate">
                    {:date('Y-m-d',$arr2.date)}
                </div>  
            </div>
    <div id="video-box" class="video-box">
    </div>
    <div class="newshowContent clear">   
        {$arr2.details}
    </div>
    </div>  <!--/newshowL-->
        <div class="newshowR">
        <div class="newshowTJ">推荐新闻</div>
        <div class="newshowfocus">
        <ul>
          
            <li>
                <div style="height:60px;padding-top:10px;width:100%">
                    <div class="newshowfocusTitle"> <a title="中天科技重磅登陆新能源全球竞争力100强" href=""> 中天科技重磅登陆新能源全球竞争力1…</a></div> 
                    <div class="newshowfocusDate">发布时间：2018-01-23</div>
                </div>
            </li>
          
            <li>
                <div style="height:60px;padding-top:10px;width:100%">
                     <div class="newshowfocusTitle"> <a title="新春茶叙聚英才   建言献策谋未来" href=""> 新春茶叙聚英才   建言献策谋未来</a></div> 
                     <div class="newshowfocusDate">发布时间：2018-01-22</div>
                </div>
            </li>
          
            <li>
                <div style="height:60px;padding-top:10px;width:100%">
                     <div class="newshowfocusTitle"> <a title="创新财务管理，中天科技斩获“金管家”奖" href=""> 创新财务管理，中天科技斩获“金管家…</a></div> 
                     <div class="newshowfocusDate">发布时间：2018-01-19</div>
                </div>
            </li>
          
        </ul>
        </div>
        </div> <!--/newshowR-->
    </div><!--/width1020-->

<div class="width1020 clear" style="padding-top: 30px;">
    <div class="fr">
        <a title="返回"  href="#"  onClick="javascript :history.back(-1);">  <img src="__STATIC__/index/images/news/return.png"/></a>
    </div>
    <span style="display:block;width:100%;height:1px;background:#ccc;"></span>
    <div style="width:800px">
        <h3 class='titlet clear'>新闻评论</h3>
        <form action="{:url('newscomment_add')}" method="post">
            <input type="hidden" name="commenter" value="{:session('username')}">
            <input type="hidden" name="title" value="{$arr2.title}">
            <input type="hidden" name="ctime" value="{:time()}">
            <textarea name="comment" id="" cols="30" rows="10" class='comment'></textarea>
            {if condition="(session('username'))"}
            <button type='submit' class='submitt'>发&nbsp;&nbsp;&nbsp;表</button>
            {else/}
            <a href="{:url('Login/login')}" class='submitif'>登陆后可评论</a>
            {/if}
        </form>
        <ul class='clear list'>
        {volist name='arr' id='list'}
            <li>
                <span class='commenter'>{$list.commenter}</span>
                <span class='date'>{:date('Y/m/d h:m:s',$list.ctime)}</span>
                <div class='comment_con clear'>
                    <p >{$list.comment}</p>
                    <span></span>
                </div>
            </li>
        {/volist}
        </ul>
    </div>
        {$arr->render()}
    
</div>
<div class="clear"></div>
 <div class="line20"></div>
{/block}